.class public Lcom/xingbook/ui/overclass/h;
.super Landroid/widget/LinearLayout;

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/widget/SeekBar$OnSeekBarChangeListener;


# annotations
.annotation build Landroid/annotation/SuppressLint;
    value = {
        "ViewConstructor"
    }
.end annotation


# instance fields
.field a:Landroid/widget/SeekBar;

.field b:Landroid/widget/TextView;

.field c:Lcom/xingbook/ui/a/ac;

.field d:Lcom/xingbook/ui/overclass/VideoView;

.field e:I

.field f:Lcom/xingbook/ui/overclass/i;

.field final g:Landroid/os/Handler;

.field private h:Landroid/widget/ImageView;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/xingbook/ui/a/ac;Lcom/xingbook/ui/overclass/i;)V
    .locals 4

    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    new-instance v0, Lcom/xingbook/ui/overclass/j;

    invoke-direct {v0, p0}, Lcom/xingbook/ui/overclass/j;-><init>(Lcom/xingbook/ui/overclass/h;)V

    iput-object v0, p0, Lcom/xingbook/ui/overclass/h;->g:Landroid/os/Handler;

    iput-object p3, p0, Lcom/xingbook/ui/overclass/h;->f:Lcom/xingbook/ui/overclass/i;

    iput-object p2, p0, Lcom/xingbook/ui/overclass/h;->c:Lcom/xingbook/ui/a/ac;

    invoke-interface {p3}, Lcom/xingbook/ui/overclass/i;->b()Lcom/xingbook/ui/overclass/VideoView;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/overclass/h;->d:Lcom/xingbook/ui/overclass/VideoView;

    const v0, 0x7f03004d

    const/4 v1, 0x0

    invoke-static {p1, v0, v1}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    const v0, 0x7f0a0255

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/SeekBar;

    iput-object v0, p0, Lcom/xingbook/ui/overclass/h;->a:Landroid/widget/SeekBar;

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->a:Landroid/widget/SeekBar;

    invoke-virtual {v0, p0}, Landroid/widget/SeekBar;->setOnSeekBarChangeListener(Landroid/widget/SeekBar$OnSeekBarChangeListener;)V

    const v0, 0x7f0a0254

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    const-string v2, "pause"

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    const v2, 0x7f020009

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0a0253

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0a0256

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/xingbook/ui/overclass/h;->b:Landroid/widget/TextView;

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v2, -0x1

    const/4 v3, -0x2

    invoke-direct {v0, v2, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v1, v0}, Lcom/xingbook/ui/overclass/h;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    return-void
.end method

.method private getDuration()I
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->d:Lcom/xingbook/ui/overclass/VideoView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->d:Lcom/xingbook/ui/overclass/VideoView;

    invoke-virtual {v0}, Lcom/xingbook/ui/overclass/VideoView;->getDuration()I

    move-result v0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


# virtual methods
.method public a()V
    .locals 4

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->g:Landroid/os/Handler;

    const/4 v1, 0x0

    const-wide/16 v2, 0x3e8

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    return-void
.end method

.method public b()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->g:Landroid/os/Handler;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    return-void
.end method

.method public c()V
    .locals 6

    const/4 v5, 0x1

    const/4 v4, 0x0

    invoke-direct {p0}, Lcom/xingbook/ui/overclass/h;->getDuration()I

    move-result v0

    iput v0, p0, Lcom/xingbook/ui/overclass/h;->e:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->a:Landroid/widget/SeekBar;

    iget v1, p0, Lcom/xingbook/ui/overclass/h;->e:I

    invoke-virtual {v0, v1}, Landroid/widget/SeekBar;->setMax(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->a:Landroid/widget/SeekBar;

    invoke-virtual {v0, v4}, Landroid/widget/SeekBar;->setProgress(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->b:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    int-to-long v2, v2

    invoke-static {v2, v3, v4, v5, v5}, Lcom/xingbook/c/i;->a(JZZZ)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const/16 v2, 0x2f

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Lcom/xingbook/ui/overclass/h;->e:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    int-to-long v2, v2

    invoke-static {v2, v3, v4, v5, v5}, Lcom/xingbook/c/i;->a(JZZZ)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public d()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    const v1, 0x7f020355

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    const-string v1, "play"

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    return-void
.end method

.method public e()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    const v1, 0x7f020359

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    const-string v1, "pause"

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 3

    const/4 v2, 0x1

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    const v1, 0x7f0a0254

    if-ne v0, v1, :cond_2

    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    const-string v1, "play"

    invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    const v0, 0x7f020359

    invoke-virtual {p1, v0}, Landroid/view/View;->setBackgroundResource(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->c:Lcom/xingbook/ui/a/ac;

    invoke-interface {v0, v2}, Lcom/xingbook/ui/a/ac;->b(Z)V

    const-string v0, "pause"

    invoke-virtual {p1, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    const-string v1, "pause"

    invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const v0, 0x7f020355

    invoke-virtual {p1, v0}, Landroid/view/View;->setBackgroundResource(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->c:Lcom/xingbook/ui/a/ac;

    invoke-interface {v0, v2}, Lcom/xingbook/ui/a/ac;->a(Z)V

    const-string v0, "play"

    invoke-virtual {p1, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    goto :goto_0

    :cond_2
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    const v1, 0x7f0a0253

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->f:Lcom/xingbook/ui/overclass/i;

    invoke-interface {v0}, Lcom/xingbook/ui/overclass/i;->a()V

    goto :goto_0
.end method

.method public onProgressChanged(Landroid/widget/SeekBar;IZ)V
    .locals 6

    const/4 v5, 0x0

    const/4 v4, 0x1

    if-eqz p3, :cond_0

    invoke-virtual {p1, p2}, Landroid/widget/SeekBar;->setProgress(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->b:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    int-to-long v2, v2

    invoke-static {v2, v3, v5, v4, v4}, Lcom/xingbook/c/i;->a(JZZZ)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const/16 v2, 0x2f

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Lcom/xingbook/ui/overclass/h;->e:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    int-to-long v2, v2

    invoke-static {v2, v3, v5, v4, v4}, Lcom/xingbook/c/i;->a(JZZZ)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    return-void
.end method

.method public onStartTrackingTouch(Landroid/widget/SeekBar;)V
    .locals 2

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->c:Lcom/xingbook/ui/a/ac;

    invoke-interface {v0, v1}, Lcom/xingbook/ui/a/ac;->b(Z)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->g:Landroid/os/Handler;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    return-void
.end method

.method public onStopTrackingTouch(Landroid/widget/SeekBar;)V
    .locals 4

    const/4 v3, 0x0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->d:Lcom/xingbook/ui/overclass/VideoView;

    invoke-virtual {p1}, Landroid/widget/SeekBar;->getProgress()I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/overclass/VideoView;->seekTo(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getTag()Ljava/lang/Object;

    move-result-object v0

    const-string v1, "play"

    invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    const v1, 0x7f020006

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->h:Landroid/widget/ImageView;

    const-string v1, "play"

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    :cond_0
    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->c:Lcom/xingbook/ui/a/ac;

    invoke-interface {v0, v3}, Lcom/xingbook/ui/a/ac;->a(Z)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/h;->g:Landroid/os/Handler;

    const-wide/16 v1, 0x3e8

    invoke-virtual {v0, v3, v1, v2}, Landroid/os/Handler;->sendEmptyMessageAtTime(IJ)Z

    return-void
.end method
